import { useI18n } from 'vue-i18n';

export const OPERATE_TYPE_BANNER = 2;
export const OPERATE_TYPE_OPERATION = 3;
export const OPERATE_STATUS_ON = 1;
export const OPERATE_STATUS_OFF = 2;
export const OPERATE_STATUS_DISABLE = 3;

export const STATUS_PUBLISHED = 1;
export const STATUS_UNREADY = 2;
export const STATUS_FAILURE = 3;
export const STATUS_LONGTERM = 4

export const operateTypeMap: Record<string, number> = {
  operation: OPERATE_TYPE_OPERATION,
  banner: OPERATE_TYPE_BANNER,
}

export function useStatusList() {
  const { t } = useI18n();

  return {
    [STATUS_PUBLISHED]: t('settings.view.operation.index.status.1'),
    [STATUS_UNREADY]: t('settings.view.operation.index.status.2'),
    [STATUS_FAILURE]: t('settings.view.operation.index.status.3'),
    [STATUS_LONGTERM]: t('settings.view.operation.index.status.4'),
  }
}
